<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>最大斐波那契数计算</title>
    <style>
        body {
            font-family: 'Arial', sans-serif;
            background-color: #f8f8f8;
            line-height: 1.6;
            margin: 0;
            padding: 0;
        }

        .container {
            max-width: 1000px;
            margin: 50px auto;
            background-color: white;
            padding: 20px;
            border-radius: 8px;
            box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
        }

        h1 {
            text-align: center;
            color: #333;
            font-size: 24px;
            margin-bottom: 20px;
        }

        form {
            margin-bottom: 30px;
            display: flex;
            flex-direction: column;
            align-items: center;
        }

        label {
            font-size: 16px;
            margin-bottom: 8px;
            color: #333;
        }

        select, button {
            padding: 10px;
            font-size: 16px;
            margin-bottom: 20px;
            width: 100%;
            max-width: 200px;
            border: 1px solid #ccc;
            border-radius: 5px;
            outline: none;
        }

        button {
            background-color: #4CAF50;
            color: white;
            cursor: pointer;
            transition: background-color 0.3s;
        }

        button:hover {
            background-color: #45a049;
        }

        table {
            width: 100%;
            border-collapse: collapse;
            margin-top: 20px;
        }

        th, td {
            padding: 12px;
            text-align: center;
            border: 1px solid #ddd;
            font-size: 16px;
        }

        th {
            background-color: #f4f4f4;
            color: #333;
        }

        td {
            background-color: #fafafa;
        }

        tr:nth-child(even) td {
            background-color: #f9f9f9;
        }

        tr:hover td {
            background-color: #f1f1f1;
        }

        .result-table {
            margin-top: 30px;
        }

        .result-table th {
            background-color: #4CAF50;
            color: white;
        }

        .result-table td {
            background-color: white;
        }

        /* Responsive design */
        @media screen and (max-width: 600px) {
            table {
                font-size: 14px;
            }

            button, select {
                width: 100%;
                font-size: 14px;
            }

            .container {
                margin: 20px;
                padding: 15px;
            }
        }

    </style>
</head>
<body>
    <div class="container">
        <h1>迭代30秒能计算的最大斐波那契数是第几个及计算其下一个斐波那契数的时间</h1>
        <div class="result-table">
            <table>
                <thead>
                    <tr>
                        <th>30秒内最大斐波那契数序号</th>
                        <th>耗时(s)</th>
                        <th>计算下一个斐波那契数耗时(s)</th>
                    </tr>
                </thead>
                <button><a href="{% url 'experiment1' %}" style="text-decoration: none; color: white">返回上一页</a></button>
                <tbody>
                    <tr>
                        <td>{{ result.max_id }}</td>
                        <td>{{ result.time1 }}</td>
                        <td>{{ result.time2 }}</td>
                    </tr>
                </tbody>
            </table>
            <div style="word-wrap: break-word;">
                其斐波那契数值的前2048位为：{{ res }}
            </div>
        </div>
    </div>
</body>
</html>
